package com.luchao.jsoup;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import java.io.IOException;

/**
 * 《邯郸成语启蒙经典故事70篇》这本书
 * http://www.eqishare.com/other/920.html
 */
public class HtmlParseUtilHdcygs {
    private static Integer num = 10;

    public static void main(String[] args) throws IOException {
        for(int i=1;i<82;i++){
            cygs(i, 1646635725647L);
        }
    }

    private static void cygs(Integer num, Long timestamp) throws IOException {
        String url = "https://www.chineseall.cn/v3/book/content/qQ4kg/epub/448719/" + num + "?t=" + timestamp;
        Document doc = Jsoup.connect(url).header("Cookie", "Hm_lvt_961aa2cba564c3f71bfbb0a4cf919ac9=1646625592,1646625624; Hm_lvt_4d5ab58054d453c3b8446c8c02fa79f6=1646625592,1646625624; redirect_url=1D45D5436D79BD6B0F4BBD7DE0B57B73CAA2004FB94B25E299AA9841DBA77650E9770002A4098558A87F1CECB158D635; RaLcXOPAou=VAQX635LWROQNUSNIT6WG4MHGYOCEYWPJKEMBSI; _Tvt5MJ89bV_=7E90845C40F6A120F1F24295ED918687916A004062C79BD90E2DD0FB8ACF250644694CD7503F4C1801AB2695490E3CBC591E88D174A55E3850CDAC37643FC0004A4887B836A43A3F03C831A4A32641EA237883624B2E199BA40C385C53148382; LvGPHdwDRT=6IJZXTPHWA7EN4NQG6GNKRLZSUYP65RYTMZM4SVZLOYENT72ISHUKD2A2RSHVTQPXKEK5WFJBUO76T2DSX5EM6NFBVJQHE3JPFRF3OY; JSESSIONID=8B19B63A77F6669C7D1B1736B394A07B; Hm_lpvt_961aa2cba564c3f71bfbb0a4cf919ac9=1646635726; Hm_lpvt_4d5ab58054d453c3b8446c8c02fa79f6=1646635726").get();
//                .header("Referer", "www.example.com/index.html")
//                .timeout(0).get();
        System.out.println(doc.toString());
    }


}
